using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace ShootThemUp.Sources.GameElements.Animations
{
    /// <summary>
    /// The animation of a teleportation.
    /// </summary>
    public class TeleportationEffect : Animation
    {
        #region Spritesheet Constants Fields

        /// <summary>
        /// The X position of the player ship texture in the spritesheet (in px).
        /// </summary>
        private const int SPRITESHEET_POSITION_X = 0;
        /// <summary>
        /// The Y position of the player ship texture in the spritesheet (in px).
        /// </summary>
        private const int SPRITESHEET_POSITION_Y = 376;
        /// <summary>
        /// The width of the player ship texture in the spritesheet (in px).
        /// </summary>
        private const int SPRITESHEET_WIDTH = 32;
        /// <summary>
        /// The height of the player ship texture in the spritesheet (in px).
        /// </summary>
        private const int SPRITESHEET_HEIGHT = 32;
        /// <summary>
        /// The number of sprites used to animate the ship.
        /// </summary>
        private const int NUMBER_OF_FRAME = 6;
        /// <summary>
        /// The duration of a frame of the animation.
        /// </summary>
        private const float ANIMATION_DURATION = 0.01f;

        #endregion

        #region Initialization

        /// <summary>
        /// Initializes a new instance of the <see cref="TeleportationEffect"/> class.
        /// </summary>
        /// <param name="x">The x-position.</param>
        /// <param name="y">The y-position</param>
        public TeleportationEffect(Vector2 position) : base(position,
                                                 new Rectangle(TeleportationEffect.SPRITESHEET_POSITION_X, TeleportationEffect.SPRITESHEET_POSITION_Y, TeleportationEffect.SPRITESHEET_WIDTH, TeleportationEffect.SPRITESHEET_HEIGHT),
                                                 TeleportationEffect.NUMBER_OF_FRAME,
                                                 TeleportationEffect.SPRITESHEET_WIDTH,
                                                 TeleportationEffect.ANIMATION_DURATION)
        {   
        }        

        #endregion
    }
}
